/**
 * Multicast project Bidois Morgan & Thomas Nunes
 *
 */
package Engine;

import java.nio.ByteBuffer;

/**
 *
 * @author thomas
 * 
 * The message object send enter entity
 */
public class Message {

    private ByteBuffer content = ByteBuffer.allocate(1000);
    private TypeMessage type =TypeMessage.NORMAL;
    private int logicalClock;
    private int idClient;

    Message(Flag flag, int logicalClock, int client, ByteBuffer bufferOut) {
        this.logicalClock = logicalClock;
        this.content = bufferOut;
        this.idClient = client;
        this.type = flag.getType();
    }

    public ByteBuffer getContent() {
        return content;
    }

    public void setContent(ByteBuffer content) {
        this.content = content;
    }

    public TypeMessage getType() {
        return type;
    }

    public void setType(TypeMessage type) {
        this.type = type;
    }

    public int getLC() {
        return logicalClock;
    }

    public void setLC(int LC) {
        this.logicalClock = LC;
    }

    public int getIdClient() {
        return idClient;
    }

    public void setIdClient(int idClient) {
        this.idClient = idClient;
    }

    public int getLogicalClock() {
        return logicalClock;
    }

    public void setLogicalClock(int logicalClock) {
        this.logicalClock = logicalClock;
    }
}
